<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>艾家艾产品线上销售平台</title>
    <link rel="shortcut icon" href="../img/favicon.ico">
    <link rel="stylesheet" href="../css/reset.css"/>
    <link rel="stylesheet" href="../them/swiper/css/swiper-3.4.2.min.css">
    <link rel="stylesheet" href="../css/change-information.css"/>
    <script src="../them/jquery/jquery-1.7.2.js"></script>
</head>
<body>
<!--头部-->
<div class="site-topbar">
    <div class="container">
        <div class="topbar-nav">
            <a href="javascript:;">在线客服</a>
            <a href="javascript:;">艾百科</a>
            <a href="javascript:;">养生百科</a>
            <a href="javascript:;">艾家商城移动版</a>
        </div>
        <div class="topbar-cart">
            <a href="javascript:;" class="cart-mini">
                <span class="cart"></span>
                <span>购物车</span>
                <span class="gwc_number"></span>
            </a>
        </div>
        <div class="topbar-info">
            <div class="login" style="display: inline-block">
                <a href="login.html">登录</a>
                <a href="register.html">注册</a>
            </div>
            <a href="javascript:;">消息通知</a>

        </div>
    </div>
</div>
<!--导航-->
<div class="site-header">
    <div class="container">
        <div class="header-logo">
            <a href="javascript:;">
                <span class="logo"></span>
            </a>
        </div>
        <div class="header-nav">
            <ul class="nav-list">
                <li class="nav-item">
                    <a href="javacsript:;" class="link">
                        <span>艾灸</span>
                    </a>
                    <div class="header-nav-menu">
                        <div class="container">
                            <ul class="children-list clearfix">
                                <li style="border-left: 0">
                                    <div class="figure figure-thumb">
                                        <a href="javascript:;">
                                            <img src="http://192.168.31.3:18089/z1.jpg" >
                                            <p class="tittle">景德镇艾灸礼包</p>
                                            <p class="price">999元</p>
                                        </a>
                                    </div>
                                </li>
                                <li>
                                    <div class="figure figure-thumb">
                                        <a href="javascript:;">
                                            <img src="http://192.168.31.3:18089/z2.jpg" >
                                            <p class="tittle">独家艾灸</p>
                                            <p class="price">999元</p>
                                        </a>
                                    </div>
                                </li>
                                <li>
                                    <div class="figure figure-thumb">
                                        <a href="javascript:;">
                                            <img src="http://192.168.31.3:18089/z3.jpg" >
                                            <p class="tittle">顶级艾灸</p>
                                            <p class="price">999元</p>
                                        </a>
                                    </div>
                                </li>
                                <li>
                                    <div class="figure figure-thumb">
                                        <a href="javascript:;">
                                            <img src="http://192.168.31.3:18089/z4.jpg" >
                                            <p class="tittle">多功能艾灸床</p>
                                            <p class="price">999元</p>
                                        </a>
                                    </div>
                                </li>
                            </ul>
                        </div>
                    </div>
                </li>
                <li class="nav-item">
                    <a href="javacsript:;" class="link">
                        <span>设备</span>
                    </a>
                    <div class="header-nav-menu">
                        <div class="container">
                            <ul class="children-list clearfix">
                                <li style="border-left: 0">
                                    <div class="figure figure-thumb">
                                        <a href="javascript:;">
                                            <img src="http://192.168.31.3:18089/zb1.jpg" >
                                            <p class="tittle">推拿仪</p>
                                            <p class="price">999元</p>
                                        </a>
                                    </div>
                                </li>
                                <li>
                                    <div class="figure figure-thumb">
                                        <a href="javascript:;">
                                            <img src="http://192.168.31.3:18089/aj1.jpg" >
                                            <p class="tittle">艾香</p>
                                            <p class="price">999元</p>
                                        </a>
                                    </div>
                                </li>
                                <li>
                                    <div class="figure figure-thumb">
                                        <a href="javascript:;">
                                            <img src="http://192.168.31.3:18089/cx1.jpg" >
                                            <p class="tittle">艾灸盒</p>
                                            <p class="price">999元</p>
                                        </a>
                                    </div>
                                </li>

                            </ul>
                        </div>
                    </div>
                </li>
                <li class="nav-item">
                    <a href="javacsript:;" class="link">
                        <span>艾柱</span>
                    </a>
                    <div class="header-nav-menu">
                        <div class="container">
                            <ul class="children-list clearfix">
                                <li style="border-left: 0">
                                    <div class="figure figure-thumb">
                                        <a href="javascript:;">
                                            <img src="http://192.168.31.3:18089/LH2.jpg" >
                                            <p class="tittle">艾柱贴</p>
                                            <p class="price">899元</p>
                                        </a>
                                    </div>
                                </li>
                            </ul>
                        </div>
                    </div>
                </li>
                <li class="nav-item">
                    <a href="javacsript:;" class="link">
                        <span>文化</span>
                    </a>
                    <div class="header-nav-menu">
                        <div class="container">
                            <ul class="children-list clearfix">
                                <li style="border-left: 0">
                                    <div class="figure figure-thumb">
                                        <a href="javascript:;">
                                            <img src="http://192.168.31.3:18089/LH3.jpg" >
                                            <p class="tittle">传艾图</p>
                                            <p class="price">1999元</p>
                                        </a>
                                    </div>
                                </li>
                                <li>
                                    <div class="figure figure-thumb">
                                        <a href="javascript:;">
                                            <img src="http://192.168.31.3:18089/sj1.jpg" >
                                            <p class="tittle">艾草书</p>
                                            <p class="price">99元</p>
                                        </a>
                                    </div>
                                </li>
                                <li>
                                    <div class="figure figure-thumb">
                                        <a href="javascript:;">
                                            <img src="http://192.168.31.3:18089/sj4.jpg" >
                                            <p class="tittle">艾灸百科</p>
                                            <p class="price">99元</p>
                                        </a>
                                    </div>
                                </li>

                            </ul>
                        </div>
                    </div>
                </li>
            </ul>
        </div>
        <div class="header-search">
            <form class="search-form clearfix" method="get">
                <input class="search-text" type="search" name="keyword" autocomplete="off">
                <input type="submit" class="search-btn" value=" ">

                <div class="search-hot-words">
                    <a href="javasctipy:;">红米Note4X</a>
                    <a href="javascript:;">红米4X</a>
                </div>
                <div class="keyword-list hide">
                    <ul class="result-list"></ul>
                </div>
            </form>
        </div>
    </div>
</div>
<!--中间-->
<div class="payment-box">
    <div class="payment">
        <div class="box">
            <p class="tittle">修改用户信息</p>
            <form>
                <label for="question">邮箱</label>
                <input type="text" id="email">
                <label for="question">手机号</label>
                <input type="text" id="phone" >
                <label for="question">密保问题</label>
                <input type="text" id="question" >
                <label for="answer">密保答案</label>
                <input type="text" id="answer" >
                <p class="verify-text hint"></p>
                <input type="button" value="确定" class="btn" id="btn">
            </form>
        </div>
    </div>
</div>
<!--底部-->
<div class="footer">
    <div class="fuwu">
        <ul>
            <li>预约维修服务</li>
            <li>7天无理由退货</li>
            <li>15天免费换货</li>
            <li>满150元包邮</li>
            <li>520余家售后网点</li>
        </ul>
    </div>
    <div class="fuwu_det clearfix">
        <ul class="fl fuwu_det_item">
            <li class="fuwu_det_i fl">
                <p>帮助中心</p>
                <ul>
                    <li>账户管理</li>
                    <li>购物指南</li>
                    <li>订单操作</li>
                </ul>

            </li>
            <li class="fuwu_det_i fl">
                <p>帮助中心</p>
                <ul>
                    <li>账户管理</li>
                    <li>购物指南</li>
                    <li>订单操作</li>
                </ul>
            </li>
            <li class="fuwu_det_i fl">
                <p>帮助中心</p>
                <ul>
                    <li>账户管理</li>
                    <li>购物指南</li>
                    <li>订单操作</li>
                </ul>
            </li>
            <li class="fuwu_det_i fl">
                <p>帮助中心</p>
                <ul>
                    <li>账户管理</li>
                    <li>购物指南</li>
                    <li>订单操作</li>
                </ul>
            </li>
            <li class="fuwu_det_i fl">
                <p>帮助中心</p>
                <ul>
                    <li>账户管理</li>
                    <li>购物指南</li>
                    <li>订单操作</li>
                </ul>
            </li>
            <li class="fuwu_det_i fl">
                <p>帮助中心</p>
                <ul>
                    <li>账户管理</li>
                    <li>购物指南</li>
                    <li>订单操作</li>
                </ul>
            </li>
        </ul>
        <ul class="fl fuwu_det_tel">
            <li class="fuwu_det_num">400-100-5678</li>
            <li class="fuwu_det_time">周一至周日 8:00-18:00</li>
            <li class="fuwu_det_time">（仅收市话费）</li>
            <li class="fuwu_det_btn">24小时在线客服</li>
        </ul>
    </div>
    <div class="bottom clearfix">
        <div class="logo_b fl"></div>
        <div class="bottom_text fl">
            <ul>
                <li>艾家商城</li>
                <li>AiJia</li>
                <li>艾聊</li>
                <li>多看书城</li>
                <li>艾生活艾草</li>
                <li>艾疗</li>
                <li>艾家天猫店</li>
                <li>艾家淘宝直营店</li>
                <li>aijia.com</li>
            </ul>
            <p>aijia.com 京ICP证110507号 京ICP备10046444号 京公网安备11010802020134号 京网文[2014]0059-0009号</p>
            <p>违法和不良信息举报电话：185-0130-1238，本网站所列数据，除特殊说明，所有数据均出自我司实验室测试</p>
        </div>
        <div class="bottom_img fl">
            <img src="../../img/truste.png" alt="">
            <img src="../../img/v-logo-1.png" alt="">
            <img src="../../img/v-logo-2.png" alt="">
            <img src="../../img/v-logo-3.png" alt="">
        </div>
    </div>
</div>
</body>
</html>
<script>
    $.ajax({
        url:'/user/get_user_info.do',
        type:'post',
        success:function(result){
            var name=result.data.username;
            if(!result.status){
                $.ajax({
                    url: '/cart/get_cart_product_count.do',
                    type: 'post',
                    success: function (res) {
                        console.log(res.data);
                        $('.gwc_number').html('('+res.data+')');
                        $('.cart-mini').css('background','rgba(255, 103, 0,.7)');
                    }
                });
                $('.login').html('<a href="javascript:;">'+name+' , 您好！</a><div class="info_select"> <a href="personal-center.html">个人中心</a> <a href="user-favorite.html">我的喜欢</a> <a href="javascript:;" class="changeInfo">修改信息</a><a href="javascript:;" class="quit">退出登录</a> </div>');
                $('.quit').click(function(){
                    $.ajax({
                        url:'/user/logout.do',
                        type:'post',
                        success:function(result){
                            if(!result.status){
                                $('.hint').html('');
                                window.location.href='index.html';
                            }
                        }
                    });
                });
            }
        }
    });
    $('.login').mouseover(function(){
        $('.info_select').css('display','block');
    });
    $('.login').mouseout(function(){
        $('.info_select').css('display','none');
    });
    var _width=$(window).width();
    $('.header-nav-menu').css('width',_width);
    $('.header-nav-menu').css('left','-40px');
    $('.header-nav .nav-list li').mouseover(function(){
        $(this).find($('.header-nav-menu')).css('display','block');
    });
    $('.header-nav .nav-list li').mouseout(function(){
        $(this).find($('.header-nav-menu')).css('display','none');
    });


    $('#question').blur(function(){
        if(!$(this).val()){
            $('.verify-text').html('密保问题不能为空');
        }else{
            $('.verify-text').html('');
        }
    });
    $('#answer').blur(function(){
        if(!$(this).val()){
            $('.verify-text').html('密保答案不能为空');
        }else{
            $('.verify-text').html('');
        }
    });
    $('#email').blur(function(){
        if(!$(this).val()){
            $('.verify-text').html('邮箱不能为空');
        }else{
            $('.verify-text').html('');
        }
    });
    $('#phone').blur(function(){
        if(!$(this).val()){
            $('.verify-text').html('手机号不能为空');
        }else{
            $('.verify-text').html('');
        }
    });
    $('.btn').click(function(){
        if(!$('#email').val() || !$('#phone').val() || !$('#question').val() || !$('#answer').val()){
            $('.verify-text').html('请填写完整');
        }
        if($('.verify-text').html()==''){
            $.ajax({
                url:'/user/update_information.do',
                data:{
                    'email':$('#email').val(),
                    'phone':$('#phone').val(),
                    'question':$('#question').val(),
                    'answer':$('#answer').val()
                },
                type:'post',
                success:function(str){
                    if(!str.status){
                        alert("修改成功");
                    }else{
                        alert('修改失败');
                    }

                },
                error:function(){

                }
            });
        }

    });
</script>